import com.qf.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class testSpring {
    @Test
    public void HelloWorld(){
        ApplicationContext ac =  new ClassPathXmlApplicationContext("bean.xml");
        Object obj = ac.getBean("userService");
        System.out.println(obj);

        Object obj1 = ac.getBean("userServlet");
        System.out.println(obj1);

    }



    @Test
    public void testShow(){
       ApplicationContext ac =  new ClassPathXmlApplicationContext("bean.xml");
        UserService userService = (UserService) ac.getBean("userService");
        userService.show();


    }
}
